<?php

namespace app\common\model;

use think\Db;
use think\Model;

class Banner extends Model{
    protected $pk = 'id';

    protected $name = 'banner';

    public function getImageAttr($value, $data)
    {
        $value = $value ? $value : (isset($data['image']) ? $data['image'] : '');
        return get_app_image_url($value);
    }
}